package com.xiaobawang.knowledge.spider.service.impl;

import com.xiaobawang.knowledge.spider.service.*;

import org.springframework.stereotype.Service;

/**
 * @author synhard
 * @description 定时任务业务逻辑实现
 * @date 2025/3/28 15:10
 * @email songxinhang2023@e-chinalife.com
 * @id 18101119
 * @phone 13001321080
 */
@Service("schedulerService")
public class SchedulerServiceImpl implements SchedulerService {

    final ChinalifeProductService chinalifeProductService;

    final GovernmentFinancialItemService governmentFinancialItemService;

    final GovernmentMedicalItemService governmentMedicalItemService;

    final PeopleBankItemService peopleBankItemService;

    public SchedulerServiceImpl(ChinalifeProductService chinalifeProductService,
                                GovernmentFinancialItemService governmentFinancialItemService,
                                GovernmentMedicalItemService governmentMedicalItemService,
                                PeopleBankItemService peopleBankItemService) {
        this.chinalifeProductService = chinalifeProductService;
        this.governmentFinancialItemService = governmentFinancialItemService;
        this.governmentMedicalItemService = governmentMedicalItemService;
        this.peopleBankItemService = peopleBankItemService;
    }

    /**
     * @author synhard
     * @description 从官网获取中国人寿产品信息
     * @date 2025/3/28 14:14
     */
    @Override
    public void getChinalifeProductFromWeb(Integer saleType, Integer fileType) {
        this.chinalifeProductService.getChinalifeProduct(saleType, fileType);
    }

    /**
     * @author synhard
     * @description 获取国家金融监督管理总局政府规章信息
     * @date 2025/3/31 16:14
     */
    @Override
    public void getGovernmentRulesFromWeb() {
        this.governmentFinancialItemService.getGovernmentFinancialRulesFromWeb();
    }

    /**
     * @author synhard
     * @description 获取国家金融监督管理总局政府行政规范性文件
     * @date 2025/3/31 16:14
     */
    @Override
    public void getGovernmentAdministrationFromWeb() {
        this.governmentFinancialItemService.getGovernmentFinancialAdministrationFromWeb();
    }

    /**
     * @author synhard
     * @description 获取国家金融监督管理总局政府其他文件
     * @date 2025/3/31 16:14
     */
    @Override
    public void getGovernmentOtherFromWeb() {
        this.governmentFinancialItemService.getGovernmentFinancialOtherFromWeb();
    }

    /**
     * @author synhard
     * @description 获取国家医疗保障总局政府其他文件
     * @date 2025/3/31 16:14
     */
    @Override
    public void getGovernmentMedicalRulesFromWeb() {
        this.governmentMedicalItemService.getGovernmentMedicalRulesFromWeb();
    }

    /**
     * @author synhard
     * @description 获取人民银行规章
     * @date 2025/6/18 14:20
     */
    @Override
    public void getPeopleBankRulesFromWeb() {
        this.peopleBankItemService.getPeopleBankRuleFromWeb();
    }

    /**
     * @author synhard
     * @description 获取人民银行行政规范性文件
     * @date 2025/6/18 14:21
     */
    @Override
    public void getPeopleAdministrationFromWeb() {
        this.peopleBankItemService.getPeopleBankAdministrationFromWeb();
    }

}
